#ifndef LINEEDIT_H
#define LINEEDIT_H

#include <QLineEdit>
#include <QCompleter>
#include <QTextEdit>

class LineEdit : public QTextEdit
{
	Q_OBJECT

public:
	LineEdit(QWidget *parent = 0);
	~LineEdit();
    void setCompleter(QCompleter *c);
    QCompleter *completer() const;

protected:
    void keyPressEvent(QKeyEvent *e);
    void focusInEvent(QFocusEvent *e);

private slots:
    void insertCompletion(const QString &completion);

signals:
	void enterKeyPressed();
	void undoShortcutPressed();
	void redoShortcutPressed();
private:
    QString textUnderCursor() const;
	QSize sizeHint() const;
	void wheelEvent(QWheelEvent *e);
    QCompleter *c;

};

#endif // LINEEDIT_H
